<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <script>
        // 1 for循环
        // var aArray = [3,6,9];

        // for(var index = 0;index<aArray.length;index++){
        //     var result = aArray[index];
        //     alert(result);
        // }

        // 2 while循环
        // var aArray = [3,6,9];
        // var index = 0;

        // while(index < aArray.length){
        //     var result = aArray[index];
        //     alert(result);
        //     index++;
        // }

        // 3 do while循环
        var aArray = [3,6,9];
        var index = 0;

        do{
            var result = aArray[index];
            alert(result);
            index++;
        }while(index > aArray.length);


    </script>
</head>
<body>

</body>
</html>